<LayoutEditFormBox :loading="load">
    <template slot="main">
        <el-form ref="editForm" :model="form" label-width="200px" label-position="left">
            <LayoutCell>
                <LayoutCellItem title="展示信息" v-if="configuration">
                    <el-form-item label="AppID">
                        {{configuration.appId}}
                    </el-form-item>
                    <el-form-item label="是否开启">
                        <el-switch v-model="configuration.isOpen" active-text="已开启" inactive-text="未开启"
                            :active-value="1" :inactive-value="0" disabled>
                        </el-switch>
                    </el-form-item>
                </LayoutCellItem>
                <LayoutCellItem title="配置">
                    <el-form-item label="商户号" prop="mchId" :rules="{ required: true, message: '请输入商户号'}">
                        <el-input v-model.trim="form.mchId" maxlength="30"></el-input>
                    </el-form-item>
                    <el-form-item label="支付秘钥" prop="mchKey" :rules="{ required: true, message: '请输入秘钥'}">
                        <el-input v-model.trim="form.mchKey"></el-input>
                    </el-form-item>
                    <el-form-item label="CERT证书" prop="keyPath" :rules="{ required: true, message: '请上传证书'}">
                        <el-upload class="upload-demo" multiple :auto-upload="false" :on-change="onChange"
                            :on-remove="onRemove" :limit="1" :file-list="fileList">
                            <el-button size="small" type="primary">{{ form.keyPath ? "已上传" : "点击上传" }}</el-button>
                        </el-upload>
                    </el-form-item>
                </LayoutCellItem>
            </LayoutCell>
        </el-form>
    </template>
    <template slot="footer">
        <el-button type="primary" @click="submit()">保存</el-button>
    </template>
</LayoutEditFormBox>